import Vue from 'vue'
import axios from 'axios'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import Utils from './common/utils'
import 'element-ui/lib/theme-chalk/reset.css'
import 'element-ui/lib/theme-chalk/index.css'
import './styles/index.scss'; /*引入公共样式*/
import './iconfont/iconfont.css'; /*引入iconfont图标*/

import filters from './filters' // filters
Object.keys(filters).forEach(key => {
 Vue.filter(key, filters[key]);
});


//注册全局自定义组件
import vueComs from './components/SearchSection/commonComs.js'
vueComs()

//img图片放大功能
import VueDirectiveImagePreviewer from 'vue-directive-image-previewer'
import 'vue-directive-image-previewer/dist/assets/style.css'
Vue.use(VueDirectiveImagePreviewer, {
  zIndex: 9999,
})



//引入公共方法
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/config/ruoyi";
import { dictionariesDetailgetDictsNew,getCategoryDetailsNew } from "@/api/getData";
// 全局方法挂载
Vue.prototype.getSelectList = dictionariesDetailgetDictsNew//获取字典数据
Vue.prototype.getCategoryDetails = getCategoryDetailsNew//获取分类数据

Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.handleTree = handleTree

//v-dialogDrag: 弹窗拖拽属性
import './common/directives';
//头部进度条
import './common/nprogress'

//登入 粒子运动效果
// import VueParticles from 'vue-particles'
// Vue.use(VueParticles)

import drectives from './directive/label/inputInt'//v-int
Vue.use(drectives)

//eventBus
Vue.prototype.$EventBus = new Vue();

// import directive from './directive/index.js' //directive
// Vue.use(directive)

import {hasPermi} from './directive/permission/hasPermi.js'//按钮权限指令
Vue.use(hasPermi) // 按钮权限指令

import plugins from './plugins' // plugins
Vue.use(plugins)


//全局注册，使用方法为:this.$axios
Vue.prototype.$axios = axios

import echarts from 'echarts'
Vue.prototype.$echarts = echarts

Vue.config.productionTip = false
Vue.use(ElementUI)

Vue.prototype.Utils = Utils

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
